package com.eva.framework.common.utils;

import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * 工具类
 */
@Component
public final class Utils {

    /**
     * Spring上下文
     */
    public static SpringContextUtil SpringContext;

    /**
     * 地区处理
     */
    public static final LocationUtil Location = new LocationUtil();

    /**
     * Http请求处理
     */
    public static final HttpUtil Http = new HttpUtil();

    /**
     * 摘要处理
     */
    public static final DigestUtil Digest = new DigestUtil();

    /**
     * 用户客户端信息
     */
    public static final UserClientUtil User_Client = new UserClientUtil();

    /**
     * 服务端信息
     */
    public static final ServerUtil Server = new ServerUtil();

    /**
     * MyBatis Plus处理
     */
    public static final MyBatisPlus MP = new MyBatisPlus();

    /**
     * 日期处理
     */
    public static final DateUtil Date = new DateUtil();

    /**
     * 线程池
     */
    public static final ThreadPoolUtil ThreadPool = new ThreadPoolUtil();

    @Resource
    public void setSpringContext(SpringContextUtil springContext) {
        Utils.SpringContext = springContext;
    }

}
